const git = require('git-rev-sync')
const replace = require('replace')
module.exports = {
  syncGitVersion() {
    let rev = git.short()
    replace({
      regex: 'GIT_REVISION_HASH=.*',
      replacement: 'GIT_REVISION_HASH=' + rev,
      paths: ['.env'],
      recursive: true,
      silent: false
  })
  }
}